package com.crm.manager.utils;

public class  BaseContext {

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
    public static ThreadLocal<String> threadLocalString = new ThreadLocal<>();


    public static void setUserId(Long id) {
        threadLocal.set(id);
    }

    public static void setUserName(String name) {
        threadLocalString.set(name);
    }

    public static String getUserName() {return threadLocalString.get(); }
    public static Long getUserId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
